#######################
##
## Module summary
##
## Main authors: Kristian
## Progress: 100%
##
#######################

#!/usr/bin/env ruby

# Right now this uses xterm as the terminal
# because that works on both OSX and linux

# Launch the db
def launch_db() 
   # In case the db file isn't already compiled
   system("erlc kvstore.erl")
   # identify computer name
   master_name = "master@"+`hostname`
   system("xterm -e 'erl -name test_db -setcookie apa -s kvstore start "+master_name+"' &")
end

# just call the launch function
launch_db()